// 整个项目api的管理
import request from "./request";
//mock如果是true用的就是线上，如果是false 用的就是mock的
export default {
    getTableData(params) {
        return request({
            url: '/home/getTableData',
            method: 'get',
            data: params,
            mock: true
        })
    },
    getCountData() {
        return request({
            url: '/home/getCountData',
            method: 'get',
            mock: true
        })
    },
    getEchartData() {
        return request({
            url: '/home/getChartData',
            method: 'get',
            mock: true
        })
    },
    getUser(params) {
        return request({
            url: '/user/getUser',
            method: 'get',
            mock: false,
            data: params
        })
    },
    addUser(params) {
        return request({
            url: '/user/add',
            method: 'post',
            mock: false,
            data: params
        })
    },
    editUser(params) {
        return request({
            url: '/user/edit',
            method: 'post',
            mock: false,
            data: params
        })
    },
    deleteUser(params) {
        return request({
            url: '/user/delete',
            method: 'get',
            mock: false,
            data: params
        })
    },
    //登陆鉴权接口
    getMenu(params) {
        return request({
            url: '/permission/getMenu',
            method: 'post',
            data: params,
            mock: true
        })
    }
}